<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Product_name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-product_name" readonly class="form-control" name="row[product_name]" type="text" value="{$row.product_name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" readonly class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Group_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_select('row[group_id]', $groupNameList, $row['group_id'], ['class'=>'form-control selectpicker',"id" => "c-group_id",'disabled'=>'disabled', 'required'=>'required'])}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Category_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_select('row[category_id]', $categoryNameList, $row['category_id'], ['class'=>'form-control selectpicker',"id" => "c-category_id",'disabled'=>'disabled', 'required'=>'required'])}
        </div>
    </div>
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Product_id')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input id="c-product_id" readonly  class="form-control" name="row[product_id]" type="text" value="{$row.product_id|htmlentities}">-->
<!--        </div>-->
<!--    </div>-->


<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Thumbnail')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input id="c-thumbnail" readonly class="form-control" name="row[thumbnail]" type="text" value="{$row.thumbnail|htmlentities}">-->
<!--        </div>-->
<!--    </div>-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Thumbnail')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
<!--                <input id="c-thumbnail" data-rule="required" class="form-control" size="50" readonly type="hidden" value="{$row.thumbnail|htmlentities}">-->
                <input id="c-thumbnail" data-rule="" class="form-control" size="50" readonly type="hidden" value="{$row.thumbnail|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-thumbnail" class="btn btn-danger faupload" data-input-id="c-thumbnail" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-thumbnail"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-thumbnail" class="btn btn-primary fachoose" data-input-id="c-thumbnail" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-thumbnail"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-thumbnail"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-price" readonly min="0" class="form-control" name="row[price]" type="number" value="{$row.price|htmlentities}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Node')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-node" readonly min="0" class="form-control" name="row[node]" type="number" value="{$row.node|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Data')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-data" readonly min="0" class="form-control" name="row[data]" type="number" value="{$row.data|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Quote')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-quote" readonly min="0" class="form-control" name="row[quote]" type="number" value="{$row.quote|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Description')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-description" readonly class="form-control editor" rows="5" name="row[description]" cols="50">{$row.description|htmlentities}</textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            {if $row.status == 0}
            {:build_radios('row[status]', ['0'=>'待审', '1'=>'已通过', '2'=>'驳回'], $row['status'])}
            {elseif condition="$row.status eq 2"/}
            <input class="form-control" name="row[status]" type="hidden" value="{$row.status|htmlentities}">
            <span class="text-warning"><i class="fa fa-circle"></i> 已驳回</span>
            {else /}
            <input class="form-control" name="row[status]" type="hidden" value="{$row.status|htmlentities}">
            <span class="text-success"><i class="fa fa-circle"></i> 已通过</span>
            {/if}
        </div>
    </div>
    <div class="form-group" data-favisible="status=2" >
        <label class="control-label col-xs-12 col-sm-2">{:__('Reason')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-reason" {if $row.status} readonly {else /}  data-rule="required"  {/if} class="form-control" name="row[reason]" type="text" value="{$row.reason|htmlentities}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Checktime')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-checktime" readonly class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[checktime]" type="text" value="{:$row.checktime?datetime($row.checktime):''}">
        </div>
    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            {if $row.status == 0}
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            {else/}
            <button type="reset" class="btn btn-primary btn-embossed btn-close" onclick="Layer.closeAll();">{:__('Close')}</button>
            {/if}
        </div>
    </div>
</form>
